Currently, the Entity Reference autocomplete field only works as trigger if the field is a node field.

This should probably have the EntityTypeManager injected via create and __construct in the parent class, but this will work and keep it a bit simpler for the time being and give the desired result. Patch attached.

Thanks for all your work on this very useful module!

Comments

el1_1el created an issue. See original summary.

el1_1el’s picture

Issue summary: View changes
hmendes’s picture

Version: 8.x-1.x-dev » 4.x-dev
Status: Active » Needs review
StatusFileSize
new2.87 KB

Adding a new patch for the 4.x-dev version.
Please review.

hmendes’s picture

Issue summary: View changes
gabriel.abdalla’s picture

Status: Needs review » Needs work

Hi, patch needs re-roll, error when applying.

marcos_lima’s picture

Status: Needs work » Needs review
StatusFileSize
new2.88 KB
new611 bytes

Hi! Patch #3 applied to me, but gave me an whitespace warning

<stdin>:49: trailing whitespace.
   *  
warning: 1 line adds whitespace errors.

I think it is because the doc comment for the entity object was missing (there was only the empty doc line), so I corrected it and made the attached patch. Tested it and it applied cleanly. Attached is also the interdiff.

avpaderno’s picture

Title: Make entity reference handler all entities (not just node) » Make the entity reference handle all the entities, not just nodes

Status: Needs review » Needs work

The last submitted patch, 6: 2878592-6.patch, failed testing. View results

marcos_lima’s picture

Status: Needs work » Needs review

Tests for this module were fixed by issue #3246024: Tests seem to be broken in 4.x., ran a retest and now they passed, so moving this back to Needs Review.

gabrielda’s picture

Assigned: Unassigned » gabrielda

Hello,
I will review this one.

lucienchalom’s picture

Assigned: gabrielda » Unassigned
Status: Needs review » Reviewed & tested by the community

Sorry @gabrielda for taking your review =)

I reviewed, the patch still applies and I believe it does what the issue ask for.

Anonymous’s picture

I've tested #6 with some modules. Patch #6 doesn't work for ECK entities, flag entities or group module.
It would be great if it could work with the ECK entity types or bundles.

  • hmendes authored a38a1081 on 4.x
    Issue #2878592 by marcos_lima, el1_1el, hmendes: Make the entity...
saurabh-2k17’s picture

Status: Reviewed & tested by the community » Fixed

Thank you everyone for your efforts.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.